package vip.mtdp.common.response;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author wangguoqing
 * @Description rest 接口处理结果返回基础类
 * @date 2019/11/29 18:46
 */
@Data
@ToString
public class CommonResponse<T> implements Serializable {

    /**返回具体数据**/
    private T data;

    /**提示code**/
    private String code;

    /**提示信息**/
    private String message;

    public CommonResponse(){}

    public CommonResponse(String code,String message){
        this.code = code;
        this.message = message;
    }

    public CommonResponse(String code, String message, T data){
        this.code = code;
        this.message = message;
        this.data = data;
    }

}
